/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.dp.vo;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author wyr
 */
@Entity
@Table(name = "song_albums")
//@NamedQueries({@NamedQuery(name = "SongAlbums.findAll", query = "SELECT s FROM SongAlbums s"), @NamedQuery(name = "SongAlbums.findByAlbumId", query = "SELECT s FROM SongAlbums s WHERE s.albumId = :albumId"), @NamedQuery(name = "SongAlbums.findByPublisherId", query = "SELECT s FROM SongAlbums s WHERE s.publisherId = :publisherId"), @NamedQuery(name = "SongAlbums.findByName", query = "SELECT s FROM SongAlbums s WHERE s.name = :name"), @NamedQuery(name = "SongAlbums.findByUpc", query = "SELECT s FROM SongAlbums s WHERE s.upc = :upc"), @NamedQuery(name = "SongAlbums.findBySellable", query = "SELECT s FROM SongAlbums s WHERE s.sellable = :sellable"), @NamedQuery(name = "SongAlbums.findByCopyright", query = "SELECT s FROM SongAlbums s WHERE s.copyright = :copyright"), @NamedQuery(name = "SongAlbums.findByParentalAdvisory", query = "SELECT s FROM SongAlbums s WHERE s.parentalAdvisory = :parentalAdvisory"), @NamedQuery(name = "SongAlbums.findByDateReleased", query = "SELECT s FROM SongAlbums s WHERE s.dateReleased = :dateReleased"), @NamedQuery(name = "SongAlbums.findByDateSellable", query = "SELECT s FROM SongAlbums s WHERE s.dateSellable = :dateSellable"), @NamedQuery(name = "SongAlbums.findByTakedown", query = "SELECT s FROM SongAlbums s WHERE s.takedown = :takedown")})
public class SongAlbums implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "albumId")
    private Integer albumId;
    @Basic(optional = false)
    @Column(name = "publisherId")
    private int publisherId;
    @Column(name = "name")
    private String name;
    @Column(name = "upc")
    private String upc;
    @Column(name = "sellable")
    private Character sellable;
    @Column(name = "copyright")
    private String copyright;
    @Column(name = "parentalAdvisory")
    private Character parentalAdvisory;
    @Column(name = "dateReleased")
    @Temporal(TemporalType.DATE)
    private Date dateReleased;
    @Column(name = "dateSellable")
    @Temporal(TemporalType.DATE)
    private Date dateSellable;
    @Basic(optional = false)
    @Column(name = "takedown")
    private char takedown;

    public SongAlbums() {
    }

    public SongAlbums(Integer albumId) {
        this.albumId = albumId;
    }

    public SongAlbums(Integer albumId, int publisherId, char takedown) {
        this.albumId = albumId;
        this.publisherId = publisherId;
        this.takedown = takedown;
    }

    public Integer getAlbumId() {
        return albumId;
    }

    public void setAlbumId(Integer albumId) {
        this.albumId = albumId;
    }

    public int getPublisherId() {
        return publisherId;
    }

    public void setPublisherId(int publisherId) {
        this.publisherId = publisherId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getUpc() {
        return upc;
    }

    public void setUpc(String upc) {
        this.upc = upc;
    }

    public Character getSellable() {
        return sellable;
    }

    public void setSellable(Character sellable) {
        this.sellable = sellable;
    }

    public String getCopyright() {
        return copyright;
    }

    public void setCopyright(String copyright) {
        this.copyright = copyright;
    }

    public Character getParentalAdvisory() {
        return parentalAdvisory;
    }

    public void setParentalAdvisory(Character parentalAdvisory) {
        this.parentalAdvisory = parentalAdvisory;
    }

    public Date getDateReleased() {
        return dateReleased;
    }

    public void setDateReleased(Date dateReleased) {
        this.dateReleased = dateReleased;
    }

    public Date getDateSellable() {
        return dateSellable;
    }

    public void setDateSellable(Date dateSellable) {
        this.dateSellable = dateSellable;
    }

    public char getTakedown() {
        return takedown;
    }

    public void setTakedown(char takedown) {
        this.takedown = takedown;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (albumId != null ? albumId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof SongAlbums)) {
            return false;
        }
        SongAlbums other = (SongAlbums) object;
        if ((this.albumId == null && other.albumId != null) || (this.albumId != null && !this.albumId.equals(other.albumId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.dp.vo.SongAlbums[albumId=" + albumId + "]";
    }

}
